<?php

namespace App\Plugin\HostServer\Admin;

use App\Models\AdminLog;

use App\Plugin\HostServer\Models\PnHostSvSystemLog;


class SystemLogController extends BaseController
{
    public $pageName='系统资金';

    /**
     * JSON 列表输出项目设置
     * @param $item
     * @return mixed
     */
    public function apiJsonItem($item)
    {
        $item['type_name']=$item->typeName;
        $item['order_name']=$item->order['name'];
        $btns[] = [
            'url' => plugin_url('HostServer\Admin\Order', 'show', ['id' => $item->order_id]),
            'name' => '查看订单',
            'class_name' => 'layui-btn-primary'
        ];
        $item['no_edit_btn']=1;
        $item['btn_open']=$btns;
        return $item;
    }

    public function indexData()
    {
        $type=key_value_arr_to_select(PnHostSvSystemLog::getType());

        return ['type'=>$type];
    }


    public function setModel()
    {
        return $this->model=new PnHostSvSystemLog();
    }



}
